import os
from pathlib import Path

BASE_DIR = Path(__file__).parent

class Config:
    # 模型路径
    MODEL_PATH = str(BASE_DIR / "best.pt")

    # 置信度阈值
    MODEL_CONF = 0.4

    # 类别
    CLASS_NAMES = ['card', 'cta', 'footer', 'grid', 'hero', 'icon', 'logo', 'navbar']

    # API
    API_ENDPOINT = os.getenv("API_ENDPOINT", "http://192.168.11.252:5000/recognize")

    #监听地址
    FLASK_HOST = "0.0.0.0"

    FLASK_PORT = 5000
